﻿<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>首页</title>
   <link type="text/css" rel="stylesheet" href="css/message.css" />
<link type="text/css" rel="stylesheet" href="css/style.css" />
<script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
<script type="text/javascript" >

   var uid = ${sessionScope.user.uid}

   $(document).ready(function () {
      $.extend({message:function(j){var e={message:" 操作成功",time:"2000",type:"success",showClose:false,autoClose:true,onClose:function(){}};if(typeof j==="string"){e.message=j}if(typeof j==="object"){e=$.extend({},e,j)}var c=e.showClose?'<a class="c-message--close">×</a>':"";var i='<div class="c-message messageFadeInDown"><div class="c-message--main"><i class=" c-message--icon c-message--'+e.type+'"></i>'+c+'<div class="c-message--tip">'+e.message+"</div></div></div>";var h=this;var f=$("body");var g=$(i);var d;var a,b;a=function(){g.addClass("messageFadeOutUp");g.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){b()})};b=function(){g.remove();e.onClose(e);clearTimeout(d)};$(".c-message").remove();f.append(g);g.css({"margin-left":"-"+g.width()/2+"px"});g.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){g.removeClass("messageFadeInDown")});f.on("click",".c-message--close",function(k){a()});if(e.autoClose){d=setTimeout(function(){a()},e.time)}}});

      $.get("getJobsEnterprise", function (msg) {
         $("#high").empty();
         for (var i = 0; i < msg.length; i++) {
            var obj = "<div class=\"lineBox\"></div>\n" +
                    "<div class=\"divBox\">\n" +
                    "<a href=\"job_info.jsp\"><img src=\"images/18.gif\" width=\"84\"/></a>\n" +
                    "<p class=\"tit\"><a href='getjobandenterprise?jid="+msg[i].jid+"'>" + msg[i].jname + "</a></p>\n" +
                    "<p class=\"sub\"><a href='getEnterprise?eid="+msg[i].enterprise.eid+"'>" + msg[i].enterprise.ename + "</a></p>\n" +
                    "<p class=\"num\"><span>"+msg[i].jmonthsalary+"</span></p>\n" +
                    "</div>";
            $(obj).appendTo("#high");
         }

      });


      $("[name='personalresume']").on("click",function () {
         if (uid=="[object Object]"){
            $.message({
               message : '您还未登录!正在为您跳转到登录界面',
               type : 'warning' ,
               time : '1500'
            });
            setTimeout(function(){
               //doSomething(这里写时间到之后需要去做的事情)
               window.location = "login.jsp";
            }, 1500);
         }else {
               window.location = "personal_resume.jsp";
         }

      });
      $("[name='personalselected']").on("click",function () {
         if (uid=="[object Object]"){
            $.message({
               message : '您还未登录!正在为您跳转到登录界面',
               type : 'warning' ,
               time : '1500'
            });
            setTimeout(function(){
               //doSomething(这里写时间到之后需要去做的事情)
               window.location = "login.jsp";
            }, 1500);
         }else {
               window.location = "personal_selected.jsp";
         }

      });
      a();
   });
   function a  () {
      if (uid!="[object Object]"){
         let name1 ="${sessionScope.user.uname}"
         if (name1.length==5){
            $("#Namecheck").html("系统自动生成用户名,可到个人中心更改！");
            $("#Namecheck").show();
            $("#Namecheck").css("color","red");
         }else {
            $("#Namecheck").html("");
            $("#Namecheck").show();
            $("#Namecheck").css("color","");
         }
         $("[name='username']").val("${sessionScope.user.uname}").attr("readonly","readonly");
         $("[name='password']").val("${sessionScope.user.upassword}").attr("readonly","readonly");
         $("[name='Login']").val("退 出");

         $("[name='Login']").on("click",function () {
            $.get("checkUser","account="+null+"&password="+null,function (boo) {
               if (boo){
                  $.message({
                     message : '退出账号！',
                     time : '1500'
                  });
                  setTimeout(function(){
                     //doSomething(这里写时间到之后需要去做的事情)
                     window.location = "index.jsp";
                  }, 1500);
               }
            });
         });
      }else {
         $("[name='Login']").on("click",function () {
               window.location = "login.jsp";
         });

      }
   }

</script>
<style type="text/css">
   a:link,a:visited{
      color: black;
      text-decoration: none;
   }
</style>
</head>

<body>
<div class="topDiv">
</div>
<div class="loginDiv">
   <div class="loginL">
      <img src="images/LOGO.png" />
      <img src="images/view_logo40.png" />
   </div>
   <div class="loginAddress">
      <div class="add1">
      </div>
   </div>
   <div class="loginC">
      <input name="keyword" type="text" placeholder="请填写关键词或选择职位..." />
      <button id="search_btn"></button>
   </div>
   <div class="loginR">
      <img src="images/spirit_40.png" />
   </div>
</div>
<div class="menuDiv">
   <a href="index.jsp" class="onnav">首页</a>
   <a href="#" name="personalresume">个人中心</a>
   <a href="#" name="personalselected">我的职位</a>
</div>
<div class="BodyMain">
   <div class="mainTop">
      <div class="mainTopL">
         <ul>
            <div class="items">
               <div class="itemOne">
                  <span class="itme1"><b></b><a href="searchJob.jsp?keyword=销售">销售</a>|<a href="searchJob.jsp?keyword=市场">市场</a>|<a href="searchJob.jsp?keyword=客服">客服</a>|<a href="searchJob.jsp?keyword=贸易">贸易</a></span>
               </div>
            </div>
            <div class="items">
               <div class="itemOne">
                  <span class="itme2"><b></b><a href="searchJob.jsp?keyword=经营管理">经营管理</a>|<a href="searchJob.jsp?keyword=人事">人事</a>|<a href="searchJob.jsp?keyword=行政">行政</a>|<a href="searchJob.jsp?keyword=财务">财务</a></span>
               </div>
            </div>
            <div class="items">
               <div class="itemOne">
                  <span class="itme3"><b></b><a href="searchJob.jsp?keyword=生产">生产</a>|<a href="searchJob.jsp?keyword=质管">质管</a>|<a href="searchJob.jsp?keyword=技工">技工</a>|<a href="searchJob.jsp?keyword=物流">物流</a></span>
               </div>
            </div>
            <div class="items">
               <div class="itemOne">
                  <span class="itme4"><b></b><a href="searchJob.jsp?keyword=教育">教育</a>|<a href="searchJob.jsp?keyword=法律">法律</a>|<a href="searchJob.jsp?keyword=咨询">咨询</a>|<a href="searchJob.jsp?keyword=翻译">翻译</a></span>
               </div>
            </div>
            <div class="items">
               <div class="itemOne">
                  <span class="itme5"><b></b><a href="searchJob.jsp?keyword=零售">零售</a>|<a href="searchJob.jsp?keyword=家政">家政</a>|<a href="searchJob.jsp?keyword=餐饮">餐饮</a>|<a href="searchJob.jsp?keyword=旅游">旅游</a></span>
               </div>
            </div>
            <div class="items">
               <div class="itemOne">
                  <span class="itme6"><b></b><a href="searchJob.jsp?keyword=广告">广告</a>|<a href="searchJob.jsp?keyword=媒体">媒体</a>|<a href="searchJob.jsp?keyword=艺术">艺术</a>|<a href="searchJob.jsp?keyword=出版">出版</a></span>
               </div>
            </div>
            <div class="items">
               <div class="itemOne">
                  <span class="itme7"><b></b><a href="searchJob.jsp?keyword=IT">IT</a>|<a href="searchJob.jsp?keyword=互联网">互联网</a>|<a href="searchJob.jsp?keyword=通信">通信</a></span>
               </div>
            </div>
         </ul>
      </div>
      <div class="mainTopR">
         <div class="ads">
            <div class="floatL" id="left"></div>
            <div class="adBox0">
              <ul style="margin-left: 0px; overflow: hidden">
                <li>
                  <a href="javascript:void(0)"><div style="background:url(images/1.jpg);background-size: cover;background-repeat: no-repeat;background-position: center"></div></a>
                </li>
                <li>
                  <a href="javascript:void(0)"><div style="background:url(images/2.jpg);background-size: cover;background-repeat: no-repeat;background-position: center"></div></a>
                </li>
                <li>
                  <a href="javascript:void(0)"><div style="background:url(images/3.gif);background-size: cover;background-repeat: no-repeat;background-position: center"></div></a>
                </li>
              </ul>
            </div>
            <div class="clear"> </div>
         </div>
         <div class="login">
            <div class="erweima">
               <div class="close"></div>
               <div class="ewmimg"><img src="images/showqrcode.jpg" /></div>
               <div class="ewmtxt">使用微信扫描上方二维码登录</div>
            </div>
            <div class="logintop">
               <div class="loginC loginA select">
                  <span>个人登录</span>
               </div>
               <div class="loginC loginB">
               </div>
            </div>
            <div class="loginmain">
               <div class="ContentA">
                  <div class="txtInput"><input name="username" type="text" placeholder="请输入用户名"/></div>
                  <div style="padding-left: 12px " id="Namecheck"></div>
                  <div class="txtInput"><input name="password" type="password" placeholder="请输入密码"/></div>
                  <div class="txtbtn">
                    <div style="float:left">
                     <br /><div class="clear"></div>
                     <a href="password.jsp" class="a2">忘记密码</a>
                    </div>
                    <input name="Login" type="button" class="lobtn" value="登  录"/>
                  </div>
                  <div class="zcbox">
                     <div class="zc2">
                        <a href="resume.jsp" class="a1">一分钟填写简历</a>
                        <a href="register.jsp" class="a2">注册</a>
                     </div>
                  </div>
               </div>
            </div>
         </div>
         <div class="clear"></div>
      </div>
   </div>
   <div class="clear"></div>
   <div class="mainCon2">
      <div class="commontitdiv">
        <div class="title">高薪职位</div>
        <span>高薪就这么任性！</span>
      </div>
      <div class="clear"></div>
      <div class="highMoney" id="high">
         <div class="divBox">
            <a href="job_info.jsp"><img src="images/18.gif" width="84"/></a>
            <p class="tit"><a href="job_info.jsp">橱柜设计</a></p>
            <p class="sub"><a href="company.jsp">深圳维意定制家居用品有限公司</a></p>
            <p class="num"><span>8K-10K</span></p>
         </div>
         <div class="lineBox"></div>
         <div class="divBox">
            <a href="job_info.jsp"><img src="images/18.gif" width="84"/></a>
            <p class="tit"><a href="job_info.jsp">橱柜设计</a></p>
            <p class="sub"><a href="company.jsp">深圳维意定制家居用品有限公司</a></p>
            <p class="num"><span>8K-10K</span></p>
         </div>
         <div class="lineBox"></div>
         <div class="divBox">
            <a href="job_info.jsp"><img src="images/18.gif" width="84"/></a>
            <p class="tit"><a href="job_info.jsp">橱柜设计</a></p>
            <p class="sub"><a href="company.jsp">深圳维意定制家居用品有限公司</a></p>
            <p class="num"><span>8K-10K</span></p>
         </div>
         <div class="lineBox"></div>
         <div class="divBox">
            <a href="job_info.jsp"><img src="images/18.gif" width="84"/></a>
            <p class="tit"><a href="job_info.jsp">橱柜设计</a></p>
            <p class="sub"><a href="company.jsp">深圳维意定制家居用品有限公司</a></p>
            <p class="num"><span>8K-10K</span></p>
         </div>
         <div class="lineBox"></div>
         <div class="divBox">
            <a href="job_info.jsp"><img src="images/18.gif" width="84"/></a>
            <p class="tit"><a href="job_info.jsp">橱柜设计</a></p>
            <p class="sub"><a href="company.jsp">深圳维意定制家居用品有限公司</a></p>
            <p class="num"><span>8K-10K</span></p>
         </div>
         <div class="lineBox"></div>
         <div class="divBox">
            <a href="job_info.jsp"><img src="images/18.gif" width="84"/></a>
            <p class="tit"><a href="job_info.jsp">橱柜设计</a></p>
            <p class="sub"><a href="company.jsp">深圳维意定制家居用品有限公司</a></p>
            <p class="num"><span>8K-10K</span></p>
         </div>
         <div class="lineBox"></div>
         <div class="divBox">
            <a href="job_info.jsp"><img src="images/18.gif" width="84"/></a>
            <p class="tit"><a href="job_info.jsp">橱柜设计</a></p>
            <p class="sub"><a href="company.jsp">深圳维意定制家居用品有限公司</a></p>
            <p class="num"><span>8K-10K</span></p>
         </div>
         <div class="lineBox"></div>
         <div class="divBox">
            <a href="job_info.jsp"><img src="images/18.gif" width="84"/></a>
            <p class="tit"><a href="job_info.jsp">橱柜设计</a></p>
            <p class="sub"><a href="company.jsp">深圳维意定制家居用品有限公司</a></p>
            <p class="num"><span>8K-10K</span></p>
         </div>
         <div class="lineBox"></div>
         <div class="divBox">
            <a href="job_info.jsp"><img src="images/18.gif" width="84"/></a>
            <p class="tit"><a href="job_info.jsp">橱柜设计</a></p>
            <p class="sub"><a href="company.jsp">深圳维意定制家居用品有限公司</a></p>
            <p class="num"><span>8K-10K</span></p>
         </div>
         <div class="lineBox"></div>
         <div class="divBox">
            <a href="job_info.jsp"><img src="images/18.gif" width="84"/></a>
            <p class="tit"><a href="job_info.jsp">橱柜设计</a></p>
            <p class="sub"><a href="company.jsp">深圳维意定制家居用品有限公司</a></p>
            <p class="num"><span>8K-10K</span></p>
         </div>
      </div>
   </div>
   <div class="clear"></div>
</div>
<div class="footerLine"></div>
<div class="footer">
  <div class="footerdown">
  </div>
</div>
</body>
<script>
   $(function () {
      $("#search_btn").on("click", function () {
         var keyword = $("[name='keyword']").val();
         window.location.href = "searchJob.jsp?keyword="+keyword
      });
   });
</script>
</html>
